package com.example.message_queue.mqserver.mapper;

import com.example.message_queue.mqserver.core.*;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * Created with Intellij IDEA.
 * Description;
 * User:TQ02
 * Data:2024-03-23
 * Time:18:07
 * Text：建表方法
 */
@Mapper
public interface MetaMapper {
    //三个核心建表方法
    void createExchangeTable();
    void createQueueTable();
    void createBindingTable();


    void insertExchange(Exchange exchange);
    List<Exchange> selectAllExchange();
    void deleteExchange(String exchangeName);

    void insertQueue(MSGQueue queue);
    List<MSGQueue> selectAllMSGQueue();
    void deleteQueue(String queueName);

    void insertBinding(Binding binding);
    List<Binding> selectAllBinding();
    void deleteBinding(Binding binding);


}
